package com.hpeng.sys.model;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "SYS_USER_AUTHORITY")
public class SysUserAuth {
	private SysUserAuthPK id;
	private String accessRight;

	public SysUserAuth() {
	}

	public SysUserAuth(SysUserAuthPK id) {
		this.id = id;
	}

	public SysUserAuth(String userCode, String funcCode, String accessRight) {
		this.id = new SysUserAuthPK(userCode, funcCode);
		this.accessRight = accessRight;
	}
	
	@EmbeddedId
	public SysUserAuthPK getId() {
		return id;
	}

	public void setId(SysUserAuthPK id) {
		this.id = id;
	}

	@Column(name = "ACCESS_RIGHT")
	public String getAccessRight() {
		return accessRight;
	}

	public void setAccessRight(String accessRight) {
		this.accessRight = accessRight;
	}

}